/**  
* @Project: alliance
* @Title: SessionUtils.java
* @author Chenzhi Wu : zhonghcc@gmail.com
* @Copyright: 2015 Chenzhi Wu. All rights reserved.
*/
package com.ant.util;

import javax.servlet.http.HttpSession;

import com.ant.form.User;

/**
 * @ClassName SessionUtils
 * @Description Util to operate Session
 * @author Chenzhi Wu : zhonghcc@gmail.com
 * @date 2015年6月6日
 */
public class SessionUtils {
	
	public static User getUser(HttpSession session){
		Object obj = session.getAttribute("user");
		if (null==obj){
			return null;
		}else{
			return (User)obj;
		}
	}
	
	public static void setUser(HttpSession session,User user){
		session.setAttribute("user", user);
	}

}
